<!DOCTYPE html>
<html dir="ltr" debug='true'>
<head>
  <meta charset="UTF-8">
  <title></title>
  <!-- prevent cache -->
  <meta http-equiv="cache-control" content="no-cache">
  <meta http-equiv="pragma" content="no-cache">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
  <meta name="format-detection" content="telephone=no">
  <meta name="msapplication-tap-highlight" content="no">
  <link rel="icon" type="image/x-icon" href="assets/icon/favicon.ico">
  <link rel="manifest" href="manifest.json">
  <meta name="theme-color" content="#4e8ef7">
  <!-- cordova.js required for cordova apps -->
  <script src="cordova.js"></script>
  <!-- un-comment this code to enable service worker
  <script>
  if ('serviceWorker' in navigator) {
  navigator.serviceWorker.register('service-worker.js')
  .then(() => console.log('service worker installed'))
  .catch(err => console.log('Error', err));
}
</script>-->
<link href="build/main.css" rel="stylesheet">
</head>
<body class="claro dbootstrap" role="main" ontouchstart onmouseover="">
  <div id="main_container">
    <div class="main-frame">
      <div class="hd hd_title" id='headerview' style='display:none'>
        <h1 class="page_title"></h1>
        <a class="mobile_back"></a>
        <span class="fr cm-header-icon cm-header-logout">
          注销
        </span>
      </div>
      <div class="main-viewport mt-70">
        <div style='display:none'>
          <!-- Ionic's root component and where the app will load -->
          <ion-app>
          </ion-app>
        </div>
      </div><!--container for all sub-viewports -->
      <div class="main-state"></div><!--纪录当前的view状态-->
    </div>
  </div>

  <!--global loading 页面加载中的loading效果-->
  <div class='cui_loading index'>
    <div class="loading"></div>
    <div class="loading-shade"></div>
  </div>

  <!--显示加载中提示 开始-->
  <div id="loading-hint">
    <div id="loaderInner" style="direction:ltr;">加载中，请稍候...</div>
  </div>
  <script type="text/javascript">
  var version = '0.1';/**内核版本号*/
  var kaiPrefx = '';//kai的目录前缀
  var appPrefix = '';//app目录前缀
  function loadScript(url,callback) {
    var head = document.head || document.getElementsByTagName("head")[0] || document.documentElement,
    script,
    options;

    if (typeof url === "object") {
      options = url;
      url = undefined;
    }
    s = options || {};
    url = url || s.url;
    callback = callback || s.success;
    script = document.createElement("script");
    script.async = s.async || false;
    script.defer = s.defer || false;
    script.type = "text/javascript";
    if (s.charset) {
      script.charset = s.charset;
    }
    if(s.cache === false){//需要显式设置不允许缓存
      //url = url+( /\?/.test( url ) ? "&" : "?" )+ "_=" +(new Date()).getTime();
      url = url+( /\?/.test( url ) ? "&" : "?" )+ '_v='+ version;
    }
    script.src = url;
    head.insertBefore(script, head.firstChild);
    if(callback){
      document.addEventListener ? (script.addEventListener("load", callback, false) ): (script.onreadystatechange = function() {
        if (/loaded|complete/.test(script.readyState)) {
          script.onreadystatechange = null;
          callback && callback()
        }
      });
    }//
  }
  var dojoConfig = {
    isH5:(function(){//判断是否是h5环境
      var hostname = location.hostname;//
      //alert(window.navigator.userAgent);
      return true;
      if((location.href.indexOf('pc/view')>=0)){
        return false;
      }else if(hostname.indexOf('wap')>=0 || (location.href.indexOf('h5')>=0) || (window.navigator.userAgent.indexOf('Mobile') >= 0)){//判断是否是H5页面
        return true;
      }else{
        return false;
      }
    })(),
    async: true,
    popup:true,
    kaiPrefix:kaiPrefx,
    appPrefix:appPrefix,
    //baseUrl:'./',
    baseUrl:(function(){//设置默认寻址路径 指向项目根目录
      if(location.pathname.indexOf('app') >= 0 && !(location.pathname.indexOf('dest') >= 0)){//开发环境
        kaiPrefx = '../../../../';//需要以/结尾 相对于项目的根目录计算路径
        appPrefix = '../';
        //kaiPrefx = srcParentDirectory;//需要以/结尾 相对于项目的根目录计算路径
        //appPrefix = srcParentDirectory;
        return './';//
      }else{//打包后的环境
        //appPrefix = './app/';
        //srcParentDirectory = 'http://192.168.1.9:3000/';
        //srcParentDirectory = 'http://121.42.51.73:3000/';
        //srcParentDirectory = './';
        ///*
        // kaiPrefx = 'https://kaijs.github.io/';//需要以/结尾
        kaiPrefx = 'https://kaijs.huaian.deno.net/';//需要以/结尾
        // https://kaijs.huaian.deno.net/kai/0.1/scripts//dojo/dojo.js?_v=0.1
        //kaiPrefx = '../../../../kaijs/';//需要以/结尾 相对于项目的根目录计算路径
        //kaiPrefx = '../../../../kai/dest/';//需要以/结尾 相对于项目的根目录计算路径
        //kaiPrefx = '../../../../kai/0.1/dist/';//需要以/结尾 相对于项目的根目录计算路径
        appPrefix = './';//需要以/结尾
        //*/
        //kaiPrefx = srcParentDirectory;//需要以/结尾
        //appPrefix = srcParentDirectory;//需要以/结尾
        return '';
      }
    })(),
    isDebug: true,
    packages: [
      // Using a string as a package is shorthand for `{ name: 'app', location: 'app' }`
    ],
    selectorEngine: 'lite',
    tlmSiblingOfDojo:true,
    has: {
      "debugAtAllCosts": true,
      "dojo-firebug": true,
      "dojo-amd-factory-scan":true,
      "dojo-debug-messages": true,
      "dojo-guarantee-console":true,
      "config-tlmSiblingOfDojo":true
    },
    //deps: ["kai/0.1/scripts/main"],
    //deps: [appPrefix + "./app/appMain/main.js"],
    deps: [appPrefix + "./appMain/main.js"],
    //"popup":true,
    waitSeconds: 0,
    map: {
      // Instead of having to type "dojo/domReady!", we just want "ready!" instead
      "*": {
        ready: "dojo/domReady"
      }
    },
    parseOnLoad: false,
    locale: "zh",
    extraLocale: [],
    //cacheBust: true,
    cacheBust: '_v='+ '_k=' + version,
    fontSizeWatch:true,
    preloadImages:true,
    callback:function(){
      if(appPrefx == './'){//打包情况下使用
        require(["appMain/main"]);
      }
    }
  };//dojo config end
  var appPrefx = appPrefix;
  var kaiScriptsPath = dojoConfig.baseUrl + kaiPrefx + 'kai/' + version + '/scripts/';
  loadScript({
    url: kaiScriptsPath + '/dojo/dojo.js',//根据index.html来路径
    async:true,
    defer:true,
    cache:false
  });
  </script>
  <!-- The polyfills js is generated during the build process -->
  <script src="build/polyfills.js"></script>
  <!-- The bundle js is generated during the build process -->
  <script src="build/main.js"></script>
</body>
</html>
